﻿<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<#include "/views/ftl/base/manager_include.ftl">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>用户列表</title>
<script type="text/javascript">
$().ready(function() {
	$("#search_button").click(function(){
		$('#select_form').submit();
    });
});

function deleteRole(id){
	var msg="确定删除吗？";
   if(confirm(msg))
   {
    $.ajax({
		type : 'post',
		url:base+"manager/Role_deleteRole",
		dataType : "json",
		data : {roleId:id},
		success : function(data) {
			
			    alert(data.msg);
                            window.location.reload();
		}
	});
	}
}
</script>
</head>
<body style="background:#eef3f7;">
<#include "/views/ftl/base/head.ftl">
<div class="Main">
  <div class="dw">
<#include "/views/ftl/base/menu.ftl">
<#function a><#return "角色列表_List"></#function> 
<!--右边内容-->
<div class="Rightbox fl">
    <!--导航-->
    <div class="Bread_crbs clear">
      <div class="Bread_crbs_img fl"></div>
      <div class="Bread_crbs_text fl">
      	<a href="javascript:void(0);"><span>权限设置</span></a>
      	<span class="fnt_famy">></span>
      	<a href="javascript:void(0);"><span>角色列表</span></a>
      </div>
    </div>
    <!--搜索框修改-->
   
	  
	    <a href="${basePath}manager/Role_addRoleUI" class="added fl"><span>新增</span></a>
    <div class="clear"></div>
    <!--表格列表-->
    <div class="Table">
      <table id="table" cellpadding="0" cellspacing="1">
        <tbody>
          <tr id="gl">
            <td>角色名称</td>
            <td>角色描述</td>
            <td>创建时间</td>
            <td>修改时间</td>
          
            <td>操作</td>
          </tr>
         <#if (list??)> 
         <#if ((list?size)>0)>
          <#list list as bean>
          <tr>
            <td>${(bean.name)!''}</td>
            <td style="text-align:left;padding-left:5px;"><#if bean.description??><#if (bean.description?length>=25)>${bean.description?substring(0,25)}...<#else>${bean.description}</#if></#if></td>
            <td>${(bean.creationDate)!''}</td>
            <td>${(bean.modificationDate)!''}</td>
            <td class="tbl_btn">
              <a href="${basePath}manager/Role_editRoleUI?roleId=${bean.id?c}"><span id="editor">修改</span></a>
              	<a href="${basePath}manager/Authority_setAuthorityUI?roleId=${bean.id?c}"><span id="yellow">权限设置</span></a>     
              <a href="javascript:deleteRole(${bean.id?c});"><span id="delete">删除</span></a>
            </td>
          </tr>
          </#list >
          </#if>
          </#if>
        </tbody>
      </table>
    </div>
  
	</div>
  </div>
</div>
</body>
</html>

